//超时连接测试1：创建一个客户端，给服务器发送一次数据后，不动了，等待查看服务器是否会正常的超时关闭连接
#include "../include/http.hpp"
#include <cassert>

int main()
{
    Muduo::Socket cli_sock;
    cli_sock.CreateClientSocket(8888, "127.0.0.1");
    std::string req = "GET /hello HTTP/1.1\r\nConnection: keep-alive\r\nContent-Length: 0\r\n\r\n";
    while(1)
    {
        cli_sock.Send((void*)req.c_str(), req.size());
        char buf[1024] = {0};
        assert(cli_sock.Recv(buf, 1023));
        LOGDEBUG("[%s]", buf);
        sleep(7);
    }
}